home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / wtek0693.zip / OOPALLEY.ZIP / SORTCLTN.H < prev    next >
C/C++ Source or Header  |  1993-04-27  |  2KB  |  42 lines

  1. #ifndef SORTEDCLTN_H
  2. #define SORTEDCLTN_H
  3.  
  4. #include "ordcltn.h"
  5.  
  6. extern const Class class_SortedCltn;
  7.  
  8. ////////////////////////////////////////////////////////////
  9. // class SortedCltn (declaration)
  10. ////////////////////////////////////////////////////////////
  11. class SortedCltn : public OrderedCltn {
  12. public:
  13.                         // constructors, destructors
  14.                         SortedCltn(unsigned size=CLTN_DEFAULT_CAPACITY);
  15.                         SortedCltn(const SortedCltn&);
  16.  
  17.                         // operators
  18.     bool                operator!=(const SortedCltn& a) const   { return !(*this==a); }
  19.     void                operator=(const SortedCltn&);
  20.     bool                operator==(const SortedCltn&) const;
  21.     virtual SeqCltn     operator&(/*const*/ SeqCltn& cltn) const;
  22.  
  23.  
  24.     virtual Object*         add(const Object&);
  25.     virtual Object*         addAfter(const Object& ob,
  26.                                      const Object& newob);
  27.     virtual Object*         addAllLast(const OrderedCltn&);
  28.     virtual Object*         addBefore(const Object& ob,
  29.                                       const Object& newob);
  30.     virtual Object*         addLast(const Object& ob);
  31.     virtual void            atAllPut(const Object& ob);
  32.     virtual int             indexOfSubCollection(const SeqCltn& cltn,
  33.                                                  int start=0) const;
  34.     virtual const Class*    isA() const;
  35.     virtual void            replaceFrom(int start, int stop,
  36.                                         const SeqCltn& replacement,
  37.                                         int startAt=0);
  38.     virtual void            sort();
  39. };
  40.  
  41. #endif
  42.